let elapsedTimeMS_min = Infinity,elapsedTimeMS_max = 0,elapsedTimeMS_all = 0,get_time = 100

world.onTick(({tick,prevTick,skip,elapsedTimeMS}) => {

    elapsedTimeMS_all += elapsedTimeMS
    elapsedTimeMS_min = Math.min(elapsedTimeMS_min,elapsedTimeMS)
    elapsedTimeMS_max = Math.max(elapsedTimeMS_max,elapsedTimeMS)

    if(tick%get_time == 0)
    {
        per_elapsedTimeMS = elapsedTimeMS_all/get_time
        world.say(`最小延迟：${elapsedTimeMS_min}ms，最大延迟：${elapsedTimeMS_max}ms，平均延迟：${per_elapsedTimeMS}ms(每${get_time}tick)`)
        elapsedTimeMS_min = Infinity,elapsedTimeMS_max = 0,elapsedTimeMS_all = 0
    }
})

export let per_elapsedTimeMS = 64